package com.sunshenshen.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.github.pagehelper.PageInfo;
import com.sunshenshen.bean.Student;
import com.sunshenshen.service.StudentService;

/*
 * branchB
 */

@Controller
public class StudentController {
	
<<<<<<< HEAD
	//ProjectA
	
=======
	//ProjectB
>>>>>>> branch 'master' of https://gitee.com/sunshenshen/sunshenshen-example4.git
	/*
<<<<<<< HEAD
	 * branchA
=======
	 * branchC
>>>>>>> refs/heads/branchB
	 */
	
	@Autowired
	private StudentService studentService;
	
	@RequestMapping("list")
	public String list(Student student,Model model,@RequestParam(defaultValue = "1")Integer pageNum,@RequestParam(defaultValue = "3")Integer pageSize) {
	
		PageInfo<Student> info = studentService.list(student, pageNum, pageSize);
		
		model.addAttribute("info", info);
		return "list";
		
	}

}
